/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.urca.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Lucas
 */
@Embeddable
public class GeSetoresPK implements Serializable {
    
	private static final long serialVersionUID = 1L;

	@Column(name = "COD_INSTITUICAO")
    private short codInstituicao;

    @Column(name = "COD_SETOR")
    private short codSetor;

    public GeSetoresPK() {
    }

    public GeSetoresPK(short codInstituicao, short codSetor) {
        this.codInstituicao = codInstituicao;
        this.codSetor = codSetor;
    }

    public short getCodInstituicao() {
        return codInstituicao;
    }

    public void setCodInstituicao(short codInstituicao) {
        this.codInstituicao = codInstituicao;
    }

    public short getCodSetor() {
        return codSetor;
    }

    public void setCodSetor(short codSetor) {
        this.codSetor = codSetor;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) codInstituicao;
        hash += (int) codSetor;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GeSetoresPK)) {
            return false;
        }
        GeSetoresPK other = (GeSetoresPK) object;
        if (this.codInstituicao != other.codInstituicao) {
            return false;
        }
        if (this.codSetor != other.codSetor) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.GeSetoresPK[ codInstituicao=" + codInstituicao + ", codSetor=" + codSetor + " ]";
    }
    
}
